package org.jackysoft.entity;

import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.struts2.json.annotations.JSON;
import org.jackysoft.annotations.Form;
import org.jackysoft.annotations.FormElement;
import org.jackysoft.annotations.FormEncType;
import org.jackysoft.util.MySqlSchema;

@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(schema=MySqlSchema.Businessbase)
@Form(id = "ArchiveDocumentForm", label = "归档文件", enctype = FormEncType.NORMAL)
public class ArchiveDocument extends AbstractEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1821986395790289233L;	
	private User executor;
	private Calendar createDate;
	private String pdfFile;
	private String name;
	
	@ManyToOne
	@FormElement(label="归档者")
	public User getExecutor() {
		return executor;
	}

	public void setExecutor(User executor) {
		this.executor = executor;
	}
	
	@FormElement(label="归档日期")
	public Calendar getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Calendar createDate) {
		this.createDate = createDate;
	}

	
	@FormElement(label="PDF文件")
	@JSON(serialize=false)
	public String getPdfFile() {
		return pdfFile;
	}

	public void setPdfFile(String pdfFile) {
		this.pdfFile = pdfFile;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}	

}